home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / luff stuff / luff⁄README < prev    next >
Encoding:
Text File  |  1986-04-19  |  2.7 KB  |  93 lines  |  [TEXT/MACA]

  1. The shar file contains following files:
  2.  
  3. README          This file.
  4.  
  5. makefile
  6.  
  7. MacLuff.rc      Resource file for rmaker.
  8.  
  9. MacLuff.h       Macdependent header.
  10.  
  11. def.h           Macindependent header.
  12.  
  13. adm.c
  14.     main()          The main program which make initialisations and
  15.             administrates who is on the move.
  16.     init_the_w()    Window initialisation.
  17.     init_the_menu() Menu initialisation.
  18.  
  19. inmove.c
  20.     inmove()                The main event loop.
  21.     do_command()            Input off commands.
  22.     adjust_cursor()
  23.     the_w_click()           Input of moves.
  24.     say_something()         The ABOUT AUTHOR subroutine.
  25.     say_something_else()    The HELP subroutine.
  26.  
  27. terminal.c
  28.     draw_x()        I
  29.     draw_o()        I Three subroutines which draws on board.
  30.     draw_empty()    I
  31.     draw_hint()     Draws a hint.
  32.     draw_message()  Draws a message over the holes in the paper.
  33.  
  34. utboard.c
  35.     utboard()       Draws the board.
  36.     draw_holes()    Draws the holes in the paper.
  37.  
  38. automat.c
  39.     automat[][]     A computer generated table which defines a finite
  40.             automat for calculating points in a string of
  41.             <space> o and x.
  42.  
  43. autom.c
  44.     autom()         A subroutine which from the table automat[][]
  45.             calculates points.
  46.  
  47. chose.c
  48.     chose()         This one is the most central subroutine. It choses
  49.             a move to do. You may call this the algorithm for
  50.             chosing moves. Now it only choses the move that
  51.             gets the highest threat and point score. To be
  52.             better it should also test moves and see whats
  53.             changing on the board!
  54.  
  55. catch.c
  56.     catch()         Fetches patterns from the board and puts them in
  57.             temporaray strings.
  58.  
  59. upd.c
  60.     update()        This one is the second most central subroutine.
  61.             It administrates the updating of points and
  62.             threats. The code can be difficult to read because
  63.             it is optimised for doing as little as possible.
  64.             If a more complicated algorithm is used in chose()
  65.             this have to be a fast one!
  66.  
  67. updtht.c
  68.     updtht()        A help routine for update. It updates the points
  69.             on the threat board.
  70.  
  71. There are three more files. Those files you don't need if you don't want
  72. to change the computing of points. The comments are in Swedish but i don't
  73. think that will be of any inconvinience.
  74.  
  75. make_header     The beginning of an automat.c file.
  76.  
  77. maketabell      Defines the computing of points. First there is a table
  78.         that defines threatpoint and point for some letters. Then
  79.         those letters are used in patterns to define where those
  80.         points are found.
  81.  
  82. makeautomat.c   Compile this with cc and run makeautomat < maketabell to
  83.         make a new automat.c file.
  84.  
  85. PS. If you make any improvments or/and have any suggestions please send the
  86. improvments/suggestions to me.
  87.  
  88.     Roland Karlsson                      roland@ttds
  89.     Dept. of Telecomm. and Computer Systems
  90.     Royal Institute of Technology
  91.     S-100 44 Stockholm
  92.     Sweden
  93.